<template>
  <a-config-provider :locale="locale">
    <div id="app">
      <router-view/>
    </div>
  </a-config-provider>
</template>
<script>
  import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
  import enquireScreen from '@/utils/device'

  export default {
    data () {
      return {
        locale: zhCN,
      }
    },
    created () {
      let that = this
      enquireScreen(deviceType => {
        // tablet
        if (deviceType === 0) {
          that.$store.commit('TOGGLE_DEVICE', 'mobile')
          that.$store.dispatch('setSidebar', false)
        }
        // mobile
        else if (deviceType === 1) {
          that.$store.commit('TOGGLE_DEVICE', 'mobile')
          that.$store.dispatch('setSidebar', false)
        }
        else {
          that.$store.commit('TOGGLE_DEVICE', 'desktop')
          that.$store.dispatch('setSidebar', true)
        }

      })
    }
  }
</script>
<style>
  .ant-layout{
    background-color: #02131a !important;
  }
  .ant-card{
    background-color: #01232c !important;
  }
  .sider.light{
    background-color: #01232c !important;
    font-weight:bold !important;
  }
  .ant-menu{
    background-color: #01232c !important;
  }
  .tab-layout-tabs.ant-tabs {
    background-color: #01232c !important;
  }
  .ant-tabs{
    color:#01232c !important;
  }
  .ant-form-item-label > label{
    color: #fff !important;
  }
  .ant-select-selection{
    background-color: #02131a !important;
  }
  .ant-select-selection{
    background-color: #02131a !important;
  }
  .ant-dropdown-open{
    background-color: #02131a !important;
  }
  .ant-select-selection--multiple .ant-select-selection__choice{
    background-color: #02131a !important;
  }
  .ant-select-dropdown{
    background-color: #02131a !important;
    border: 1px solid #0a6a78;
  }
  /deep/.layout .header .user-wrapper .action:hover{
    background-color: #02131a !important;
  }
  .ant-modal-content{
    background-color: #02131a !important;
  }
  /deep/.ant-pagination-prev .ant-pagination-item-link, .ant-pagination-next .ant-pagination-item-link{
    background-color: #02131a !important;
  }
</style>